Tool Path Generation Method and Apparatus

ABSTRACT

A method including a bend angle calculation step of calculating a bend angle θ at each connecting point of a broken line which is obtained by successively connecting a predetermined plurality of machining points P 1  to P 3  by line segments, an approximation curve derivation step of deriving an approximation curve L 5  closer to the connecting point the larger the bend angle θ calculated by the bend angle calculation step, and a tool path generation step of generating a tool path PA 7  along the approximation curve L 5  derived by the approximation curve derivation step.

TECHNICAL FIELD

The present invention relates to a tool path generation method andapparatus for generating a tool path at the time of machining aworkpiece.

BACKGROUND ART

As this type of a tool path generation method, in general, smoothingtreatment which approximates a broken line obtained by connecting aplurality of machining points by a curve so as to generate a smooth toolpath is known. If such smoothing treatment is carried outacross-the-board at all of the machining path including parts withshapes of large bend angles, the error in shape from the desiredmachined shape increases and thus, the machined shape may be converselydegraded. Considering this point, for example, Patent Literature 1describes a method of comparing a bend angle of a broken line with apredetermined threshold value and validating (turning on) orinvalidating (turning off) the smoothing treatment in accordance withtheir relative magnitudes.

In this regard, machining point data is generally prepared by utilizinga CAD/CAM system etc. For this reason, even if a curvature of a machinedsurface is constant, the lengths of the broken line segments (blocklengths) vary and the bend angles also vary. Therefore, if the method,like the one described in the above Patent Literature 1, of turning thesmoothing treatment on and off at a specific bend angle is used, therewill be portions where the smoothing treatment is turned on and portionswhere it is turned off regardless of the curvature of the machinedsurface being constant and therefore, it is difficult to obtain a smoothmachined surface.

CITATIONS LIST

Patent Literature 1

Japanese Unexamined Patent Publication No. 2009-199483

SUMMARY OF INVENTION

The present invention is a tool path generation method for generating atool path at a time of machining a workpiece, including a bend anglecalculation step of calculating a bend angle at each connecting point ofa broken line which is obtained by successively connecting apredetermined plurality of machining points by line segments, anapproximation curve derivation step of deriving an approximation curvecloser to the connecting point the larger the bend angle calculated bythe bend angle calculation step, and a tool path generation step ofgenerating the tool path by a new broken line along the approximationcurve derived by the curve derivation step.

Further, the present invention is a tool path generation apparatus forgenerating a tool path at a time of machining a workpiece, including abend angle calculation unit calculating a bend angle at each connectingpoint of a broken line which is obtained by successively connecting apredetermined plurality of machining points by line segments, anapproximation curve derivation unit deriving an approximation curvecloser to the connecting point the larger the bend angle calculated bythe bend angle calculation unit, and a tool path generation unitgenerating the tool path by a new broken line along the approximationcurve derived by the approximation curve derivation unit.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a view which shows the general configuration of the entiremachine tool which has a tool path generation apparatus according to anembodiment of the present invention.

FIG. 2A to FIG. 2C are views which show transitions in the generation ofa tool path.

FIG. 3A and FIG. 3B are views which explain problem points in the caseof smoothing treatment such as in FIG. 2C.

FIG. 4 is a view which explains other problem points in the case ofsmoothing treatment such as in FIG. 2C.

FIG. 5 is a block diagram which shows the configuration of a controldevice of FIG. 1.

FIG. 6 is a view which explains processing in the bend angle calculationunit of FIG. 5.

FIG. 7 is a view which explains processing in a route insertion unit,approximation curve calculation unit, and data extraction unit of FIG.5, in the case where machining points are comprised of 2D data.

FIG. 8 is a view which shows a characteristic feature of the imaginaryblock length which is stored in a characteristic storage unit of FIG. 5.

FIG. 9 is a view which explains a calculation formula of anapproximation curve.

FIG. 10 is a view which explains processing in a route insertion unit,approximation curve calculation unit, and data extraction unit of FIG.5, in the case where machining points are comprised of 3D data.

FIG. 11 is a view which explains the advantageous effects according tothe present invention.

DESCRIPTION OF EMBODIMENTS

Hereinafter, referring to FIG. 1 to FIG. 11, embodiments of a tool pathgeneration apparatus according to present invention will be explained.FIG. 1 is a view which shows a general configuration of the entiremachine tool which has the tool path generation apparatus according toan embodiment of the present invention and shows a vertical machiningcenter as an example.

A column 2 is erected on a bed 1. At the column 2, a spindle head 3 issupported movably in the up-down direction (Z-axis direction) via alinear feed mechanism. At the spindle head 3, a tool 4 is attachedfacing downward via the spindle. The tool 4 is, for example, an end milland is driven to rotate by a spindle motor inside of the spindle head 3.On the bed 1, a saddle 5 is supported movably in the horizontaldirection (Y-axis direction) via a linear feed mechanism. On the saddle5, a table 6 is supported movably in the horizontal direction (X-axisdirection) perpendicular to the Y-axis direction. Each of the linearfeed mechanisms is, for example, comprised of a ball screw and a servomotor which drives rotation of the ball screw. Due to the aboveconfiguration, the tool 4 and the workpiece W move relative to eachother in the three perpendicular axis directions (X-, Y-, andZ-directions) whereby the workpiece W is worked.

The spindle motor and the servo motors are controlled in accordance witha machining program by a control device 10. In the machining program, apath of movement of the tool 4 is set as a tool path in advance. Thetool 4 moves relative to the workpiece 4 along this tool path.

The machining program is prepared by utilizing a known CAD/CAM system.That is, the CAD data corresponding to the machined shape of theworkpiece W is used as the basis to prepare CAM data consisting of a setof fine linear commands. This CAM data is comprised of a tremendousvolume of point group data, so data is thinned from the CAD data inaccordance with predetermined rules to give an amount of data suitablefor a machining program. Due to this, a machining program is prepared.

FIG. 2A is a view which shows an example of a tool path according to thethus prepared machining program. A comparatively rough broken line isused to show the tool path PA1. The machining program is givencoordinate data of end points of the broken line segments (called“machining command points”, “block end points”, or simply “machiningpoints”) in a block format. The block end points are successivelyconnected to give the tool path PA1 of FIG. 2A. Below, in a broken linecomprised of consecutive line segments (FIG. 2A, L1 and L2), the angle θformed by the line segment L2 with the extension of the line segment L1when it is extended toward L2 is defined as a “bend angle”.

If the tool 4 is moved along the tool path PA1 comprised of thecomparatively rough broken line which is shown in FIG. 2A, it is notpossible to obtain a smooth machined surface of the workpiece W.Therefore, a predetermined curve approximation formula is used tocalculate an approximation curve for each machining point, and theapproximation curve is used as the basis to correct the tool path, whichis referred as so-called “smoothing treatment”.

FIG. 2B is a view which shows an example of a tool path after thesmoothing treatment. After the smoothing treatment, the tool path PA2 isgiven by a large number of points of coordinate data along theapproximation curve, and the smoothing treatment results in a smoothcurve. For this reason, a smooth machined surface is obtained. On theother hand, at a machining point P1 with a large bend angle, the toolpath PA2 greatly deviates from the targeted workpiece shape (dottedline) and therefore the desired shape of the workpiece cannot beobtained. To avoid this problem, it may be considered to not carry outthe smoothing treatment across-the-board for all of the machiningpoints, but to invalidate the smoothing treatment when a bend angle θ islarge,

FIG. 2C is a view which shows an example of a tool path PA3 which isobtained by invalidating the smoothing treatment when a bend angle θ ata machining point is larger than a threshold value θa. If validating(turning on) and invalidating (turning off) the smoothing treatment inaccordance with bend angles θ in this way, it is possible to suppressshape error of the workpiece W at a machining point P1 with a large bendangle θ.

However, machining point data is prepared by utilizing a CAD/CAM system.Therefore, even if the curvature of a machined surface SF1 is constantsuch as when machining a cylindrical shape, the lengths of the brokenline segments (block lengths ΔL) will differ and the bend angles θ willalso differ as shown in FIG. 3A. For this reason, when carrying outsmoothing treatment, there will be a region A where the smoothingtreatment is partially turned off as shown in FIG. 3B, so it will bedifficult to obtain a smooth machined surface.

Furthermore, differences in machining points, as shown in FIG. 4, alsooccur among adjoining tool paths (dotted line region A). Differencesalso occur in the bend angles θ. For this reason, when a threshold valueθa is set near the bend angles θ of the machining points in this regionA, there will be a tool path where the smoothing treatment is turned onand a tool path where it is turned off and therefore, it will not bepossible to obtain a smooth machined surface in whole. In order to solvethe above such problem, in the present embodiment, the tool path isgenerated in the following way.

FIG. 5 is a block diagram which shows the configuration of the controldevice 10. The control device 10 has a tool path generation device 20which generates a tool path at the time of machining a workpiece and anumerical control device 30 which uses the NC data set by the machiningprogram as the basis to control the motors of the machine tool so thatthe tool 4 moves relative to the workpiece W along this tool path.

The tool path generation device 20 is comprised of a processing systemwhich has a CPU, ROM, RAM, and other peripheral circuits etc. It has aprogram reading unit 21, a bend angle calculation unit 22, a routeinsertion unit 23, a characteristic storage unit 24, an approximationcurve calculation unit 25, and a data extraction unit 26.

The program reading unit 21 successively reads the block end point dataof the machining program which is prepared by the CAD/CAM system, i.e.,the 3D coordinate data of the machining points (machining point data).

The bend angle calculation unit 22 successively calculates the bendangle θ of each machining point, based on the machining point data readby the program reading unit 21. For example as shown in FIG. 6, if themachining point data of the three points P0, P1, and P2 are read, thebend angle θ1 at P1 is calculated, if the machining point data of P3 isread, the bend angle θ2 at P2 is calculated, and if the machining pointdata of P4 is read, the bend angle θ3 at P3 is calculated. It is alsopossible to read all of the machining point data, then calculate thebend angles θ at the machining points all together.

The route insertion unit 23 inserts a route (imaginary block R) alongthe imaginary axis α which perpendicularly intersects each of theX-axis, Y-axis, and Z-axis at the machining points used for calculationof the bend angles θ. After that, the route insertion unit 23, theapproximation curve calculation unit 25, and the data extraction unit 26carry out the smoothing treatment by using the concept of the imaginaryblock R to generate a new tool path. Here, in order to facilitate theexplanation of the imaginary block R, first, the explanation will begiven assuming that the machining points are given by 2D coordinatedata.

FIG. 7 is a conceptual view of an imaginary block R in the case wherethe machining points are given by 2D coordinate data. In the figure, themachining points P1, P2, and P3 are respectively set on an XY plane(upper figure), while the X- and Y-components of the points arerespectively P1 (x1, y1), P2 (x2, y2), and P3 (x3, y3). P1 and P2 areconnected by the line segment L1, and P2 and P3 are connected by theline segment L2, whereby a broken line is formed. The curve PA5 in thefigure is a tool path which is obtained by approximation of themachining points P1, P2, and P3 by a curve on the XY plane.

When such machining points P1, P2, and P3 are given by only the XYcomponents, the axis perpendicular to each of the X-axis and Y-axis isthe Z-axis. The imaginary axis α is equal to the Z-axis. Therefore, ifinserting the imaginary block R at the machining point P2 which has thebend angle θ2, i.e., between the line segments L1 and

L2, toward the Z-axis direction, the line segment L2 is shifted in theZ-axis direction, and a new broken line which successively connects theend points P1 and P2 of the line segment L1 and the end points P2′ andP3′ of the line segment L2 after shifting is obtained. At this time, thelength of the inserted imaginary block R(imaginary block length ΔR) isdetermined by a characteristic feature of the imaginary block length ΔRwhich is stored in the characteristic storage unit 24.

FIG. 8 is a view which shows the feature f(θ) of the imaginary blocklength ΔR which is stored in the characteristic storage unit 24. In thefigure, the imaginary block length ΔR increases in a S-shape along withan increase of the bend angle θ. That is, in a region A with a smallbend angle θ (0≦θ≦θα), ΔR is substantially 0, while in a region B with abend angle θ larger than a predetermined value θα (θα<θ≦θβ), ΔRincreases by a comparatively large ratio along with an increase of thebend angle θ, and in a region C with a bend angle θ over a predeterminedvalue θβ (θβ<θ), ΔR is substantially constant (=ΔRmax). The imaginaryblock length ΔR which corresponds to the bend angle θ2 at the machiningpoint P2 of FIG. 7 is the maximum ΔRmax.

If expressing the α coordinate component at the machining point P2 by α2(=−ΔRmax), the X, Y, and α components of the points P1, P2, P2′, and P3′which constitute the new broken line become respectively P1 (x1, y1, 0),P2 (x2, y2, 0), P2′ (x2, y2, α2), and P3′ (x3, y3, α2). Theapproximation curve calculation unit 25 of FIG. 5 calculates theapproximation curve L4 of these four points (FIG. 7).

The approximation curve L4 is, for example, calculated by a 3D Beziercurve. A “Bezier curve” is an approximation curve P(t) of the fourpoints Q0, Q1, Q2, and Q3 such as shown in FIG. 9. The calculationformula is expressed by the following formula (I).

P(t)=(1−t)³ Q0+3t(1−t)² Q1+3t ²(1−t)Q2+t ³ Q3   (I)

The letter “t” corresponds to the path on the curve P(t) which startsfrom Q0. By entering the X-, Y-, Z-, and other coordinate componentsinto Q0 to Q3 of the formula (I) and changing “t” over the entire lengthof 0 to P(t), the coordinate values of P(t) are found for eachcoordinate component.

Specifically, when finding the approximation curve L4 of FIG. 7, byentering the X-components x1, x2, x2, and x3 of P1, P2, P2′, and P3′into Q0 to Q4 and changing “t” by a predetermined pitch, the X-componentof each point Pt is found for each predetermined pitch. Similarly, byentering the Y-components y1, y2, y2, and y3 of P1, P2, P2′, and P3′into Q0 to Q4 and changing “t” by a predetermined pitch, the Y-componentof each point Pt is found for each predetermined pitch. Further, byentering the α-components 0, 0, a2, and a2 of P1, P2, P2′, and P3′ intoQ0 to Q4 and changing “t” by a predetermined pitch, the α-component ofeach point Pt is found for each predetermined pitch. By connecting thepoints Pt which are found in the above way, the approximation curve L4of FIG. 7 is obtained in the XYα space.

The data extraction unit 26 extracts the remaining components afterremoving the α-components from the approximation curve L4, i.e., the XYcomponents of the points Pt. Due to this, as shown in FIG. 7, it ispossible to obtain a plurality of points Pt′ which are points projectingthe points Pt on the XY plane. By successively connecting these Pt′, anew tool path PA4 can be generated.

The thus generated tool path PA4 has a smaller inside curve amount ofthe tool path (distance from machining point P2 to tool path PA4)compared with the tool path PAS which is obtained by simplyapproximating the machining points P1 to P3 by a curve (FIG. 7) and issuppressed in strength of smoothing of the inside curve amount of thetool path. Here, the “strength of smoothing” is determined in accordancewith the imaginary block length ΔR which is inserted at the machiningpoint P2. The larger the bend angle θ is, the longer the imaginary blocklength ΔR becomes(FIG. 8). For this reason, the larger the bend angle θ,the more the strength of the smoothing can be suppressed.

In the example of FIG. 7, the bend angle θ is large and the block lengthΔR is long, so the approximation curve L4 passes on the imaginary blockR and the inside curve amount becomes 0. However, when the bend angle θis small, the approximation curve L4 does not pass on the imaginaryblock R and the inside curve amount does not become 0. That is, in aregion C where the bend angle θ is larger than θβ of FIG. 8, the insidecurve amount becomes 0 and a result similar to those when the smoothingtreatment is turned off, shown in the machining point P1 of FIG. 2C, isobtained. On the other hand, in the region A where the bend angle θ issmaller than θα of FIG. 8, the inside curve amount is large and a resultsimilar to those when the smoothing treatment is turned on, shown in themachining point P1 of FIG. 2B, is obtained.

Next, as shown in FIG. 10, the smoothing treatment when the machiningpoints P1 to P3 are given by the XYZ coordinates will be explained. Inthis case, after the bend angle calculation unit 22 calculates the bendangle θ2 at the machining point P2, the route insertion unit 23 insertsan imaginary block R along the imaginary axis α which is perpendicularto each of the XYZ axes, between the line segment L1 and the linesegment L2. Although the imaginary axis α is a conceptual axis whichcannot actually be shown, it is shown for convenience sake in FIG. 10.FIG. 10 shows the tool path PA6 obtained by just smoothing treatment ofthe machining points P1 to P3.

The imaginary block length ΔR is determined by the characteristicfeature f(θ) of FIG. 8. The approximation curve calculation unit 25calculates the approximation curve L5 of the points P1, P2, P2′, and P3′after insertion of the imaginary block R by the above formula (I). Thatis, by entering the XYZα coordinate components of P1, P2, P2′, and P3′into Q0 to Q3 of formula (I) and changing “t” over the entire length of0 to P(t), the coordinate values of P(t) are determined for eachcoordinate component.

The data extraction unit 26 extracts the components remaining afterremoval of the α-components from the approximation curve L5, i.e., theXYZ components of the points Pt. Due to this, as shown in FIG. 10, it ispossible to obtain points Pt′ corresponding to Pt in the XYZ 3D space.By successively connecting these Pt′, a new tool path PA7 can begenerated.

The thus generated tool path PA7 has a smaller inward curve amount ofthe tool path compared with the tool path obtained by just smoothingtreatment of the machining points P1 to P3 and is suppressed in strengthof smoothing.

The point group data obtained by the data extraction unit 26 is outputto a not shown program rewriting unit, and the block data of themachining program is rewritten along the tool path PA7. Based on thismachining program, the numerical control device 30 controls the drive ofthe motors. Due to this, the workpiece W is machined along the tool pathPA7.

The operation of the tool path generation method of according to thepresent embodiment is summarized as follows:

First, the program reading unit 21 reads the machining program which isgenerated by the CAD/CAM system, while the bend angle calculation unit22 calculates the bend angle θ of the broken line which is obtained bysuccessively connecting the block end points of the machining program(bend angle calculation step).

Next, an approximation curve L5 closer to the connecting point P2 thelarger the calculated bend angle θ (for example, θ2) is derived (curvederivation step), and a tool path PA7 is generated along theapproximation curve L5 (tool path generation step).

In this case, the route insertion unit 23 inserts an imaginary block R,which is parallel to the imaginary axis α perpendicular to the X-axis,Y-axis, and Z-axis and which has an imaginary block length ΔR whichcorresponds to the bend angle θ2, at the connecting point P2. Due tothis, the machining points P2 and P3 respectively move in parallel alongthe imaginary axis α by the imaginary block length ΔR whereby theimaginary points P2′ and P3′ are set. Next, the approximation curvecalculation unit 25 calculates the approximation curve L5 of the fourpoints P1, P2, P2′, and P3′, and the data extraction unit 26 extractsthe XYZ components of the approximation curve L5 and thus, the new toolpath PA7 is generated by the point group data of the 3D space.

By generating the tool path PA7 in this way, it is possible to changethe strength of the smoothing in accordance with the bend angle θ2 andpossible to optimize the inward curve amount of the tool path accordingto the smoothing treatment. That is, imaginary block length ΔRcorresponds to the strength of the smoothing. When the bend angle θ islarge, the inward curve amount is small (smoothing becomes weak), whilewhen the bend angle θ is small, the inward curve amount is large(smoothing becomes large). For this reason, even when the positions ofthe machining points differ on the same tool path or between adjoiningtool paths and the bend angles θ differ, it is possible to smoothlymachine the workpiece W and obtain the precise workpiece shape.

FIG. 11 is a view which shows a characteristic feature f1 (broken line)of the smoothing strength in the case of turning the smoothing treatmenton and off in accordance with the relative magnitude of a bend angle θand threshold value θa, and a characteristic feature f2 (solid line) ofthe smoothing strength in the case of carrying out the smoothingtreatment according to the present embodiment. As explained above, thesmoothing strength corresponds to the inward curve amount of theconnecting point.

According to the characteristic feature f1, for example, when the bendangles of adjoining machining points P1 and P2 are θ1 and θ2, at themachining point P1, the smoothing treatment is turned on (smoothingstrength maximum), while at the machining point P2, the smoothingtreatment is turned off (smoothing strength 0). For this reason, despitethe bend angle θ not changing that much, the smoothing strength rapidlychanges and obtaining a smooth machined surface becomes difficult. Asopposed to this, according to the characteristic feature f2, if the bendangles are θ1 and θ2, the change in smoothing strength is small and asmooth machined surface can be obtained.

According to the present embodiment, the following functions and effectscan be exhibited:

-   -   (1) The bend angles θ at the connecting points of the broken        line obtained by successively connecting a plurality of        machining points are calculated, an approximation curve L5        (FIG. 10) closer to the connecting points the larger the bend        angles θ is derived, and a tool path PA7 is generated along the        approximation curve L5. Due to this, it is possible to suppress        error of the machined shape of the workpiece W and obtain a        smooth machined surface even if the bend angles θ differ.    -   (2) An imaginary block R which is perpendicular to the XYZ axes        and has a length corresponding to the bend angle θ is inserted,        and an approximation curve L5 of the broken line after insertion        of the imaginary block is calculated. Therefore, an        approximation curve L5 closer to the connecting points the        larger the bend angles θ can be easily derived.    -   (3) The point group data which is obtained by extraction of the        XYZ components from the approximation curve L5 is used as the        basis to generate the tool path PA7, so it is possible to easily        generate the tool path PA7 of a 3D space from the approximation        curve L5 which uses the imaginary block R. In this case, the        imaginary axis α perpendicularly intersects each of the XYZ        axes, so even if removing the components of the imaginary axis        α, there is no effect on the other XYZ coordinate components.    -   (4) The characteristic feature f(θ) of the imaginary block        length ΔR is divided into substantially three regions A to C        (FIG. 8). At the region A with a small bend angle θ and the        region C with a large one, the imaginary block length ΔR is made        substantially constant, while at the intermediately region B        where the bend angle θ is θα to θβ, the imaginary block length        ΔR is made to gradually become longer along with an increase of        the bend angle θ. Due to this, it is possible to change the rate        of change of the smoothing strength in accordance with the        magnitude of the bend angle θ and possible to obtain excellent        smoothing corresponding to the differences in positions of the        machining points compared with the case of changing the        smoothing strength by a constant rate of change corresponding to        the bend angle θ.

The feature of the present invention is changing the strength ofsmoothing in accordance with the bend angle θ. As long as carrying out asmoothing treatment closer to the connecting point the larger the bendangle θ and using a new broken line after the smoothing treatment togenerate the tool path PA5, the approximation curve derivation step andthe tool path generation step as a smoothing treatment step may beconfigured in any way. That is, it is also possible to generate a toolpath closer to the connecting point the larger the bend angle θ withoutinserting the imaginary block R.

In the above embodiment, in a broken line obtained by successivelyconnecting three successive machining points (first machining point P1,second machining point P2, and third machining point P3) by linesegments, the larger the bend angle θ at the middle machining point P2,the greater the amount of movement along the imaginary axis αperpendicular to the XYZ axes is made by moving in parallel themachining points P2 and P3 along the imaginary axis α in the samedirection to set imaginary points (first imaginary point P2′ and secondimaginary point P3′), and an approximation curve L5 of these points P1,P2, P2′, and P3′ is calculated. However, as long as deriving anapproximation curve closer to the connecting point the larger the bendangle θ, the approximation curve derivation step may be configured inany way.

In the above embodiment, the program reading unit 21 reads the machiningprogram prepared by the CAD/CAM system and the bend angle calculationunit 22 calculates the bend angles θ at the individual connectingpoints. However, it is possible to prepare the initial machining programwithout going through a CAD/CAM system. The configuration of the bendangle calculation unit is not limited to this. The route insertion unit23 inserts the imaginary axis α at a connecting point and theapproximation curve calculation unit 25 approximates the curve by aBezier curve to find the approximation curve L5. However, it is alsopossible to approximate a curve by a B spline curve or NURBS curve orother curve so as to find the approximation curve L5. The configurationof the approximation curve derivation unit is not limited to the onewhich is explained above. The data extraction unit 26 extracts the XYZcomponents of the approximation curve L5 to generate the tool path PA7.However, it is also possible to thin a predetermined number of dataafter extraction of the XYZ components, in order to generate the toolpath. The configuration of the tool path generation unit is not limitedto the one explained above.

In the above embodiment, the control device 10 provided at the machinetool is provided with the tool path generation apparatus 20 and thenumerical control device 30. However, the numerical control device 20may also be provided with the tool path generation apparatus 30.Further, it is also possible to provide the tool path generationapparatus 20 separate from the control device 10. In the aboveembodiment, although the tool path generation apparatus 10 is applied toa machining center, the tool path generation apparatus of the presentinvention can be similarly applied to another machine tool whichrequires generation of a tool path at the time of machining a workpiece.

According to the present invention, smoothing treatment closer to theconnecting point the larger the bend angle at the connecting point iscarried out and a tool path is generated by the new broken line afterthe smoothing treatment. Therefore, it is possible to suppress error ofthe machined shape of the workpiece and obtain a smooth machined surfaceeven if there are differences in the bend angles.

REFERENCE SIGNS LIST

10 control device

20 tool path generation apparatus

21 program reading unit

22 bend angle calculation unit

23 route insertion unit

24 characteristic storage unit

25 approximation curve calculation unit

26 data extraction unit

30 numerical control device

L4, L5 approximation curve

PA1 to PA7 tool path

1. A tool path generation method for generating a tool path at a time ofmachining a workpiece, comprising: a bend angle calculation step ofcalculating a bend angle at each connecting point of a broken line whichis obtained by successively connecting a predetermined plurality ofmachining points by line segments; and a smoothing treatment step ofexecuting a smoothing treatment closer to the connecting point thelarger the bend angle calculated by the bend angle calculation step andusing a new broken line after the smoothing treatment so as to generatethe tool path.
 2. A tool path generation method for generating a toolpath at a time of machining a workpiece, comprising: a bend anglecalculation step of calculating a bend angle at each connecting point ofa broken line which is obtained by successively connecting apredetermined plurality of machining points by line segments; anapproximation curve derivation step of deriving an approximation curvecloser to the connecting point the larger the bend angle calculated bythe bend angle calculation step; and a tool path generation step ofgenerating the tool path along the approximation curve derived by theapproximation curve derivation step.
 3. The tool path generation methodaccording to claim 2, wherein the approximation curve derivation stepincludes, when a first machining point, a second machining point, and athird machining point are successively connected by the line segments toform a broken line, moving in parallel the second machining point andthe third machining point along an imaginary axis perpendicular to aX-axis, a Y-axis, and a Z-axis in the same direction to set a firstimaginary point and a second imaginary point, so that the larger thebend angle at the second machining point calculated by the bend anglecalculation step is, the greater an amount of movement along theimaginary axis is, and calculating an approximation curve of the firstmachining point, the second machining point, the first imaginary point,and the second imaginary point, and wherein the tool path generationstep includes generating the tool path based on a point group dataobtained by extracting a X-component, a Y-component, and a Z-componentof the approximation curve.
 4. A tool path generation apparatus forgenerating a tool path at a time of machining a workpiece, comprising: abend angle calculation unit calculating a bend angle at each connectingpoint of a broken line which is obtained by successively connecting apredetermined plurality of machining points by line segments; anapproximation curve derivation unit deriving an approximation curvecloser to the connecting point the larger the bend angle calculated bythe bend angle calculation unit; and a tool path generation unitgenerating the tool path along the approximation curve derived by theapproximation curve derivation unit.